else if(msg.rfind("join", 0) == 0)
{
    std::istringstream iss(msg);
    std::string cmd, room_name, pwd;
    iss >> cmd >> room_name >> pwd;

    if(room_name.empty())
    {
        std::string err = "[Server] Usage: /join <room_name> [password]\n";
        send(fd, err.c_str(), err.size(), 0);
        continue;
    }

    std::string err;
    if(!room_manager.join(fd, room_name, pwd, err))
    {
        err = "[Server]" + err;
        send(fd, err.c_str(), err.size(), 0);
        continue;
    }

    std::string join_msg = color_wrap(get_current_time() + "[Server]" + get_nickname(fd) + "joined room: " + room_name + "\n" , Color::GREEN);
    send(fd, join_msg.c_str(), join_msg.size(), 0);
    log_to_file("[Join] " + get_nickname(fd) + " entered room: " + room_name);
    continue;
}



